
<?php

if (count($messages) > 0)
    foreach ($messages as $row) {
        echo "<tr>\n";
        if( $row->image_name_from != NULL )            
             $image = "<img src='".base_url()."profile/image/thumb/{$row->from}/{$row->image_name_from}' alt='{$row->username_from}'>";            
           else
             $image = "<img src='".base_url()."img/no_photo.gif' alt=''>";
        echo "<td>".$image;
        echo "<a href='javascript: view_user_activity({$row->from})' >{$row->username_from}</a></td>";
        echo "<td class='dd'> <=> </td>";
        if( $row->image_name_to != NULL )            
             $image = "<img src='".base_url()."profile/image/thumb/{$row->to}/{$row->image_name_to}' alt='{$row->username_to}'>";            
           else
             $image = "<img src='".base_url()."img/no_photo.gif' alt=''>";
        echo "<td>".$image;
        echo "<a href='javascript: view_user_activity({$row->to})' >{$row->username_to}</a></td>";
        echo "<td><span>" . $row->time . "</span><br/>";
        echo "<p>" . $row->content . "</p></td>";
        echo "</tr>\n\n";
    }
else
    echo "<tr><td>" . lang('no_conversations') . "</td></tr>";
?>
